<template>
  <ADrawerPro :title="props.roleData?.roleName + ' 授权分配'" width="800px" v-bind="$attrs" :open="props.open">
    <div class="content-container mini-scroll-bar">
      <div class="auth-user-container">
        <AuthUser :open="props.open" :roleId="props.roleData?.roleId" />
      </div>

      <div class="auth-menu-container">
        <AuthMenu :open="props.open" :roleId="props.roleData?.roleId" />
      </div>
    </div>
  </ADrawerPro>
</template>

<script setup>
import { ADrawerPro } from '@/components/iteration';
import AuthUser from './AuthUser.vue';
import AuthMenu from './AuthMenu.vue';

defineOptions({
  inheritAttrs: false
});

const props = defineProps({
  open: { type: Boolean, default: false },
  roleData: { type: Object, default: () => ({}) }
});
</script>

<style lang="scss" scoped>
.content-container {
  width: 100%;
  height: 100%;
  overflow: auto;

  .auth-user-container {
    height: 60vh;
  }
}
</style>
